Skip to content

Auditability system - #415

Draft
yyi5708 wants to merge 4 commits into
devfrom
324-have-an-auditability-system-that-tracks-important-actions
Draft

Auditability system#415
yyi5708 wants to merge 4 commits into
devfrom
324-have-an-auditability-system-that-tracks-important-actions

Conversation

@yyi5708

@yyi5708 yyi5708 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

WIP

@yyi5708 yyi5708 added this to the v1.10.0 milestone Jul 23, 2026
@yyi5708
yyi5708 requested a review from andymeneely July 23, 2026 13:34
@yyi5708 yyi5708 self-assigned this Jul 23, 2026
@yyi5708 yyi5708 added the enhancement New feature or request label Jul 23, 2026
@yyi5708 yyi5708 linked an issue Jul 23, 2026 that may be closed by this pull request
@github-project-automation github-project-automation Bot moved this to Needs Planning in Portal Development Jul 23, 2026
@yyi5708 yyi5708 moved this from Needs Planning to Todo in Portal Development Jul 23, 2026
@yyi5708 yyi5708 moved this from Todo to In Progress in Portal Development Jul 23, 2026
@yyi5708
yyi5708 marked this pull request as draft July 23, 2026 13:35

@andymeneely andymeneely left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Ok the main things are:

  • There might be some methods here that are either repeats of methods we've done elsewhere, so it might be worthwhile to either use them or move them to a more shared utility module.
  • Since the AuditLogger primarily interacts with the database anyway, I think we should keep the parameter to the routes module as it is, and AuditLogger just uses the db object. Keeps the interface simpler I think.

Comment thread server/server/database/table_sql/audit_log.sql Outdated
Comment thread server/server/audit/audit_logger.js Outdated
Comment thread server/server/database/table_sql/create_all_tables.sql
Comment thread server/server/audit/audit_logger.js Outdated
Comment thread server/server/audit/audit_logger.js Outdated
Comment thread server/server/routing/db_routes.js Outdated
Comment thread server/server/routing/db_routes.js Outdated
Comment thread server/server/routing/index.js Outdated
@github-project-automation github-project-automation Bot moved this from In Progress to Under Review in Portal Development Jul 23, 2026
@andymeneely andymeneely changed the title Auditability System New audit_log table, and initial calls to the audit log Jul 23, 2026
@andymeneely andymeneely changed the title New audit_log table, and initial calls to the audit log New audit_log table, and log edits to actions in the audit_log Jul 23, 2026
@yyi5708 yyi5708 moved this from Under Review to In Progress in Portal Development Jul 25, 2026
@yyi5708
yyi5708 requested a review from andymeneely July 26, 2026 18:03
@yyi5708 yyi5708 linked an issue Jul 30, 2026 that may be closed by this pull request
4 tasks
@yyi5708

yyi5708 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

audit_logger.js:

const ACTION_TYPES = {
  CREATE: "CREATED",
  UPDATE: "UPDATED",
  DELETE: "DELETED", //NEW
  DEACTIVATE: "DEACTIVATED",
  REACTIVATE: "REACTIVATED",
};

@yyi5708 yyi5708 linked an issue Jul 30, 2026 that may be closed by this pull request
4 tasks
@yyi5708 yyi5708 changed the title New audit_log table, and log edits to actions in the audit_log Auditability system Jul 30, 2026
@yyi5708

yyi5708 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

db_routes.js:

//Semesters
/createSemester”
  CREATE

/editSemester”
  UPDATE

//Actions
/createAction”
  CREATE //DONE
  DEACTIVATE
  REACTIVATE

/editAction”
  UPDATE //DONE
  DEACTIVATE //DONE
  REACTIVATE //DONE

//Projects
/editProject”
  UPDATE //DONE

//Archives
/createArchive”
  CREATE
  DEACTIVATE
  REACTIVATE

/editArchive”
  UPDATE
  DEACTIVATE
  REACTIVATE

//Users
/createUser”
  CREATE
  DEACTIVATE
  REACTIVATE

/editUser”
  UPDATE
  DEACTIVATE
  REACTIVATE

//Sponsors
/createSponsor”
  CREATE
  DEACTIVATE
  REACTIVATE

/editSponsor”
  UPDATE
  DEACTIVATE
  REACTIVATE

/createSponsorNote”
  CREATE

//Time Logs
/createTimeLog”
  CREATE

/removeTime”
  DELETE

//Error Logs
/removeErrorLog/:id”
  DELETE

//Misc
/submitAction”
  CREATE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Auditability system: MVP features and plans Have an auditability system that tracks important actions

2 participants